#include<bits/stdc++.h>
using namespace std;

const int N=1e5+10;
int n;
int va[N];
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);

    cin>>n;
    for(int i=1;i<=n;i++)
    {
        cin>>va[i];
    }

    sort(va+1,va+1+n);

    int x=va[1];
    int sum=n;
    int l=1;

    for(int i=1;i<=n;i++)
    {
        if(va[i]>x)
        {
            l=l+1;
            x=va[l];
            sum--;
        }
    }

    cout<<sum;
    return 0;
}
